$(document).ready(function() {

    $('#input-order').keyup(function() {
        var idOrder = $('#input-order').val();
        if (validate(idOrder, "^[1-9][0-9]*$")) {
            var linkOrder = "index.jsp?content=conditionview&order=" + idOrder;         
            $('#link-order').attr('href', linkOrder);
            $('#link-order').show();
        } else {
            $('#link-order').hide();
        }
    });

    function validate(value, pattern) {
        var reg = new RegExp(pattern);
        return reg.test(value);
    }

});


